{template('../public/header.html')}

<!--站内信列表-->
<div {@noempty for='big_menu'}class="pad_10"{/@noempty}{@empty for='big_menu'}class="pad_10"{/@empty} >
    <form name="searchform" method="get" >
    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
            <tr>
                <td>
                <div class="explain_col">
                    <input type="hidden" name="m" value="admin" />
                    <input type="hidden" name="c" value="message" />
                    <input type="hidden" name="a" value="index" />
                    <input type="hidden" name="menuid" value="{$menuid}" />
                    发送时间：
                    <input type="text" name="time_start" id="time_start" class="date J_date_picker" size="12" value="{:req('time_start')}">
                    -
                    <input type="text" name="time_end" id="time_end" class="date J_date_picker" size="12" value="{:req('time_end')}">
					{if clng(req("type"))=2}
                    &nbsp;发送者 :
                    <input name="from_name" id="from_name" type="text" class="input-text" size="15" value="{:req('from_name')}" />
                    {/if}
					&nbsp;接收者 :
                    <input name="to_name" id="to_name" type="text" class="input-text" size="15" value="{:req('to_name')}" />
                    &nbsp;关键字 :
                    <input name="keyword" type="text" class="input-text" size="25" value="{:req('keyword')}" />
                    <input type="hidden" name="type" value="{:req('type')}" />
                    <input type="submit" name="search" class="btn" value="搜索" />
                </div>
                </td>
            </tr>
        </tbody>
    </table>
    </form>

    <div class="J_tablelist table_list" data-acturi="{:U('message/ajax_edit')}">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
                <th width=25><input type="checkbox" id="checkall_t" class="J_checkall"></th>
                <th width="150"><span data-tdtype="order_by" data-field="from_id">发信人</span></th>
                <th width="150"><span data-tdtype="order_by" data-field="to_id">收信人</span></th>
                <th>信息内容</th>
                <th width="140"><span data-tdtype="order_by" data-field="add_time">发送时间</span></th>
                {if clng(req("type"))=2}
				<th width="80"><span data-tdtype="order_by" data-field="status">{:L('status')}</span></th>
				{/if}
                <th width="80">{:L('operations_manage')}</th>
            </tr>
        </thead>
    	<tbody>
			{@noempty for='rs'}
			{$rs type='rs' pagesize='0' }
            <tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="{$rs("id")}"></td>
                <td align="center">{$rs("from_name")}</td>
                <td align="center">{if rs("to_id")=0}所有会员{else}{$rs("to_name")}{/if}</td>
                <td align="left">{:ctext(rs("info"))}</td>
                <td align="center">{:stdtime(rs("add_time"))}</td>  
				{if req('type')=2}
				<td align="center">
				    {if rs("status")=3}<span class="strike gray">已删(接受者)</span>{elseif rs("status")=2}<span class="strike gray">已删(发送者)</span>{elseif rs("status")=1}已读{else}<span class="red">未读</span>{/if}
				</td>
				{/if}
                <td align="center"><a href="javascript:void(0);" class="J_confirmurl" data-uri="{:U('message/delete?id=' & rs("id") )}" data-acttype="ajax" data-msg="{:sprintf(L('confirm_delete_one'),rs("from_name"))}">{:L('delete')}</a></td>
            </tr>
            {/$rs}
			{/@noempty}
    	</tbody>
    </table>
	</div>
    <div class="btn_wrap_fixed">
        <label class="select_all"><input type="checkbox" name="checkall" class="J_checkall">{:L('select_all')}/{:L('cancel')}</label>
        <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('message/delete')}" data-name="id" data-msg="{:L('confirm_delete')}" value="{:L('delete')}" />
		<div id="pages">
			{@pager data='rs'}
				{$pager("total")} 条记录 {$pager("no")}/{$pager("count")} 页 {if pager("count")>1}{$pager("bar")}{/if}
			{/@pager}
		</div>
    </div>
</div>
{template('../public/footer.html')}
</body>
</html>
